package com.training.java.corejava.Inheritance;

public class Computer 
{

	private String brand="";
	private String model="";
	private String processor="";
	private String memory="";
	private boolean coolingFan=false;
	private String color="";
	private boolean powerOn=false;
	
	Computer()
	   {
		   
	   }
		
	  Computer(String brand, String model, String processor)
		 {
		 
			this.brand = brand;
			System.out.println("\nbrand in super class: "+ this.brand);
			this.model = model;
			System.out.println("\nmodel in super class: " + this.model);
			this.processor = processor;
			System.out.println("\nprocessor in super class " + this.processor);
			
		}
	 
	
	 public boolean isPowerOn() {
		return powerOn;
	}

	public void setPowerOn(boolean powerOn) {
		this.powerOn = powerOn;
	}

	public String getBrand() {
		return brand;
	}

	public String getModel() {
		return model;
	}

	public String getProcessor() {
		return processor;
	}
	
   public String getMemory() {
		return memory;
	}

	public void setMemory(String memory) {
		this.memory = memory;
	}

	public boolean isCoolingFan() {
		return coolingFan;
	}

	public boolean setCoolingFan(boolean coolingFan) {
		this.coolingFan = coolingFan;
		return coolingFan;
	}

	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	
	public void start()
	{
		if (!isPowerOn())
		{
			setPowerOn(true);
		}
		System.out.println("\nComputer is starting now");
		
	}
	
	public void stop()
	{
		setPowerOn(false);
		System.out.println("\nComputer is switched Off");
			
		
	}
	
}
